package com.example.gokchinesefoodmappcdev.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.gokchinesefoodmappcdev.entity.OrderInfo;
import com.example.gokchinesefoodmappcdev.entity.OrderReturn;
import com.example.gokchinesefoodmappcdev.entity.OrderSku;
import com.example.gokchinesefoodmappcdev.entity.dto.OrderInfoDTO;
import com.example.gokchinesefoodmappcdev.entity.dto.OrderInfoExcelDTO;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;
import java.util.List;

@Mapper
public interface OrderInfoDao extends BaseMapper<OrderInfo> {

    List<OrderInfo> selectOrderList();

    int selectAddressIdByOrderNo(String orderNo);

    OrderInfo selectOrderInfoByOrderNo(String orderNo);

    List<OrderInfoDTO> selectSubOrdersByOrderNo(String orderNo);

    List<OrderSku> selectListSubOrder(String orderNo);


    int deliveryOrder(@RequestParam("orderNo") String orderNo,@RequestParam("logisticsNumber") String logisticsNumber,@RequestParam("logisticsCompany") String logisticsCompany,@RequestParam("deliveryTime") Date deliveryTime);

    List<OrderInfoExcelDTO> getOrdersInfo();

    List<OrderReturn> selectOrderReturnList(String returnNo);
}
